import request from '@/utils/request'

// 查询床位信息表列表
export function listBedinfo(query) {
  return request({
    url: '/hospital/bedinfo/list',
    method: 'get',
    params: query
  })
}

export function listBedinfoYan(query) {
  return request({
    url: '/hospital/bedinfo/listYan',
    method: 'get',
    params: query
  })
}


export function allDepartmentListYan() {
  return request({
    url: '/hospital/bedinfo/allDepartmentListYan',
    method: 'get',
  })
}
export function allDepartmentBedListYan(allDepartmentbedLocation) {
  return request({
    url: '/hospital/bedinfo/allDepartmentBedListYan/'+allDepartmentbedLocation,
    method: 'get',
  })
}

// 排班
export function listBedinfos(query) {
  return request({
    url: '/user/doctor/paiban',
    method: 'get',

  })
}

// 查询床位信息表详细
export function getBedinfo(bedId) {
  return request({
    url: '/hospital/bedinfo/' + bedId,
    method: 'get'
  })
}

// 新增床位信息表
export function addBedinfo(data) {
  return request({
    url: '/hospital/bedinfo',
    method: 'post',
    data: data
  })
}

export function addBedinfoYan(data) {
  return request({
    url: '/hospital/bedinfo/bedinfoyan',
    method: 'post',
    data: data
  })
}

// 修改床位信息表
export function updateBedinfo(data) {
  return request({
    url: '/hospital/bedinfo',
    method: 'put',
    data: data
  })
}

// 删除床位信息表
export function delBedinfo(bedId) {
  return request({
    url: '/hospital/bedinfo/' + bedId,
    method: 'delete'
  })
}
